<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title th:replace="common/base::pagetitle"></title>
    <link th:replace="common/base::static"/>
    <link rel="stylesheet" th:href="@{/static/plugins/easyui/themes/material/easyui.css}">
    <link rel="stylesheet" th:href="@{/static/plugins/easyui/themes/icon.css}">
    <link rel="stylesheet" th:href="@{/static/css/wlb-treegrid.css}">
</head>
<body style="background-color: #f2f2f2;">

<div class="layui-form" style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">机构名称</label>
        <div class="layui-input-inline">
            <input type="text" name="compName" th:value="${creditCoreBankInfo.compName}" placeholder="请输入机构名称"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">组织代码</label>
        <div class="layui-input-inline">
            <input type="text" name="comCerNo" th:value="${creditCoreBankInfo.comCerNo}" placeholder="请输入组织代码"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div  class="layui-form-item">
        <label class="layui-form-label">税务登记号</label>
        <div class="layui-input-inline">
            <input type="text" name="registrationNo" th:value="${creditCoreBankInfo.registrationNo}"
                   placeholder="请输入税务登记号" autocomplete="off" class="layui-input">
        </div>

    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">注册资金</label>
        <div class="layui-input-inline">
            <input type="text" name="registryAmount" th:value="${creditCoreBankInfo.registryAmount}"
                   placeholder="请输入注册资金" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">资产总额</label>
        <div class="layui-input-inline">
            <input type="text" name="businessTotalAmount" th:value="${creditCoreBankInfo.businessTotalAmount}"
                   placeholder="请输入总销售额" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">年销售额</label>
        <div class="layui-input-inline">
            <input type="text" name="businessSalesAmount" th:value="${creditCoreBankInfo.businessSalesAmount}"
                   placeholder="请输入年销售额" autocomplete="off" class="layui-input">
        </div>
    </div>



    <div class="layui-form-item">
        <label class="layui-form-label">企业法人</label>
        <div class="layui-input-inline">
            <input type="text" name="sort" th:value="${creditCoreBankInfo.legalName}" placeholder="请输入企业法人"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">法人证件号</label>
        <div class="layui-input-inline">
            <input type="text" name="sort" th:value="${creditCoreBankInfo.legalNo}" placeholder="请输入法人证件号"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">银行卡号</label>-->
<!--        <div class="layui-input-inline">-->
<!--            <input type="text" name="bankNo" th:value="${creditCoreBankInfo.bankNo}" placeholder="请输入银行卡号"-->
<!--                   autocomplete="off" class="layui-input">-->
<!--        </div>-->

<!--    </div>-->

    <div class="layui-form-item">
        <label class="layui-form-label">管理人姓名</label>
        <div class="layui-input-inline">
            <input type="text" name="admName" th:value="${creditCoreBankInfo.admName}" placeholder="请输入管理人姓名"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">管理人手机号</label>
        <div class="layui-input-inline">
            <input type="text" name="admMobPhone" th:value="${creditCoreBankInfo.admMobPhone}" placeholder="请输入管理人姓名"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">在职人数</label>
        <div class="layui-input-inline">
            <input type="payrolls" name="sort" th:value="${creditCoreBankInfo.payrolls}" placeholder="请输入在职人数"
                   autocomplete="off" class="layui-input">
        </div>

    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">经营范围（多个用逗号隔开）</label>
        <div class="layui-input-inline">
            <input type="text" name="sort" th:value="${creditCoreBankInfo.businessScope}" placeholder="请输入经营范围"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">公司成立日期</label>
        <div class="layui-input-inline">
            <input type="text" name="setupDate" th:value="${creditCoreBankInfo.setupDate}" placeholder="请输入公司成立日期"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">公司地址</label>
        <div class="layui-input-inline">
            <input type="text" name="comAddress" th:value="${creditCoreBankInfo.comAddress}" placeholder="请输入公司地址"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">供应商类型</label>
        <div class="layui-input-block" id="supplierType">
            <input type="radio" name="supplierType" value="1" title="材料供应商" autocomplete="off" class="layui-input"
                   th:checked="${creditCoreBankInfo.supplierType ==1}">
            <input type="radio" name="supplierType" value="0" title="其他" autocomplete="off" class="layui-input"
                   th:checked="${creditCoreBankInfo.supplierType !=1}">
        </div>
    </div>

<!--    <div class="layui-form-item" >-->
<!--        <label class="layui-form-label">选择匹配银行</label>-->
<!--        <div class="layui-input-inline">-->
            <input type="hidden" name="bankId" th:value="${bankId}" placeholder="银行id"
                   autocomplete="off" class="layui-input">
<!--            <select name="bankId"  lay-filter="one_cate">-->
<!--                <option value="">请选择</option>-->
<!--                <option th:each="car,userStat:${orgRelationVos}" th:value="${car.id}" th:text="${car.compName}"></option>-->
<!--            </select>-->
<!--        </div>-->
<!--    </div>-->

<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">申请金额</label>-->
<!--        <div class="layui-input-inline">-->
<!--            <input type="text" name="applyAmount"  placeholder="请输入申请金额Y"-->
<!--                   autocomplete="off" class="layui-input">-->
<!--        </div>-->
        <input name="supplierId" hidden="hidden" th:value="${supplierId}"/>

        <input type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="kFormSubmit" id="kFormSubmit" value="确认添加">

<!--    </div>-->

    <div class="layui-form-item">
    </div>


</div>

<script th:replace="common/base::context"></script>
<script th:replace="common/base::mainjs"></script>
<script th:src="@{/static/plugins/easyui/easyloader.js}"></script>

<script type="text/javascript" th:inline="none">
    layui.use(['form'], function () {
        var $ = layui.$, form = layui.form;
        //监听提交
        form.on('submit(kFormSubmit)', function (data) {
            var field = data.field; //获取提交的字段
            // var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引

            log("field=====",field);
            var url = 'credit/applyAudit';
            //提交 Ajax 成功后，关闭当前弹层并重载表格
            $.ajax({
                type: req.type.post,
                url: BASE_WEB + url,
                data: field,
                async: false,
                success: function (r) {
                    log("msg",r.msg);
                    if (r.code === req.status.ok) {
                        // 重载表格
                        window.location.href = api.credit.creditApplyIndex;
                        // parent.layer.close(index); //再执行关闭
                    } else {
                        wlbKit.errorMsg(r.msg);
                    }
                }
            });

        });
    })






</script>

</body>
</html>
